#ifndef __EXIT_BUTTON_H__
#define __EXIT_BUTTON_H__

#include "widget.h"

typedef struct exit_button
{
    uint8_t pressed;
} exit_button_t;

/*! Create a exit button
 * \param parent: pointer to its parents widget
 * \param x: coordinate left corner
 * \param y: coordinate top corner
 * \param width: width of the button
 * \param height: height of the button
 * \return: pointer to the exit buttons widget
 */
widget_t *create_exit_button(widget_t*,int32_t,int32_t,uint32_t,uint32_t);

/*! callback function: called when the widged needs redrawing
 * \param self: pointer to its widget
 * \param hdc: pointer to the widget device context
 */
void exit_button_paint(widget_t*,HDC);

/*! callback function: called when the left mouse button is pressed
 * \param self: pointer to its widget
 * \param x: mouse coordinate
 * \param y: mouse coordinate
 * \param flag: virtual key status
 */
void exit_button_lbutton_down(widget_t*,int32_t,int32_t,uint32_t);

/*! callback function: called when the left mouse button is released
 * \param self: pointer to its widget
 * \param x: mouse coordinate
 * \param y: mouse coordinate
 * \param flag: virtual key status
 */
void exit_button_lbutton_up(widget_t*,int32_t,int32_t,uint32_t);

/*! callback function: called when the mouse enter the widget client area
 * \param self: pointer to its widget
 * \param x: mouse coordinate
 * \param y: mosue coordinate
 * \param flag: virtual key status
 */
void exit_button_mouse_enter(widget_t*,int32_t,int32_t,uint32_t);

/*! callback function: called when the mouse leaves the widgets client area
 * \param self: pointer to its widget
 */
void exit_button_mouse_leave(widget_t*);

/*! callback function: free the memory for the exit button;
 * \param self: pointer to its self
 */
void exit_button_free(widget_t*);

#endif /* __EXIT_BUTTON_H__ */

